// JavaScript Document
function DoNav(theUrl) {
	document.location.href = theUrl;
}

function clear(x) {
	/*elm.document.forms[0].style.background="";*/
	x.style.color = "red";
	document.getElementById(x).style.color = "yellow";
	/*elm.style.cssText = "";*/
}

function isEmail(vEMail)
{
	var regInvalid=/(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/;
	var regValid=/^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/;
	return (!regInvalid.test(vEMail)&&regValid.test(vEMail));
}

//去除html标签
function DelHtml(Word){
	a = Word.indexOf("<");
	b = Word.indexOf(">");
	len = Word.length;
	c = Word.substring(0, a);
	if(b == -1)
		b = a;
	d = Word.substring((b + 1), len);
	Word = c + d;
	tagCheck = Word.indexOf("<");
	if(tagCheck != -1)
	Word = DelHtml(Word);
	return Word;
}

function showDetails(l,n)
{
	for(var i=1; i<=n;i++)
	{
		if(i==l)
		{
			if(document.getElementById("details_"+l).style.display=="")
			{
				document.getElementById("details_"+l).style.display="none";
			}else{
				document.getElementById("details_"+l).style.display="";
			}
		}else{
			document.getElementById("details_"+i).style.display="none";
		}
	}
}

function writeflash(flashURL,flashWIDTH,flashHEIGHT)
{
document.writeln ('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase=" http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" WIDTH='+flashWIDTH+' HEIGHT='+flashHEIGHT+'>'); 
document.writeln ('<PARAM NAME=movie VALUE="'+flashURL+'">'); 
document.writeln ('<PARAM NAME=wmode VALUE=transparent>'); 
document.writeln ('<PARAM NAME=loop VALUE=true>'); 
document.writeln ('<PARAM NAME=quality VALUE=high>'); 
document.writeln ('<EMBED src="'+flashURL+'" loop=true wmode=opaque quality=high swLiveConnect=FALSE WIDTH='+flashWIDTH+' HEIGHT='+flashHEIGHT+' TYPE="application/x-shockwave-flash" PLUGINSPAGE=" http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>'); 
document.writeln ('</OBJECT>'); 
}

function MM_jumpMenu(targ, selObj, restore) { //v3.0
	eval(targ + ".location='" + selObj.options[selObj.selectedIndex].value + "'");
	if (restore) selObj.selectedIndex = 0;
}
